<?php
$this->breadcrumbs = array(
    'Ruang Rapat' => $this->createUrl('/' . $this->module->id . '/front/index'),
    'Reservation',
);
?>

<div class="wide form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'rapat-reservation-form',
	'enableAjaxValidation'=>true
)); ?>

	<p class="note">Fields dengan tanda <span class="required">*</span> harus diisi.</p>

	<?php echo $form->errorSummary($model); ?>

        <div class="row">
		<?php echo $form->labelEx($model,'user_id'); ?>
		<?php echo $form->textField($model,'user_id'); ?>
		<?php echo $form->error($model,'user_id'); ?>
	</div>
        
	<div class="row">
		<?php echo $form->labelEx($model,'name'); ?>
		<?php echo $form->textField($model,'name'); ?>
		<?php echo $form->error($model,'name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'date'); ?>
                <?php
                    $this->widget('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker',array(
                        'model'=>$model, //Model object
                        'attribute'=>'date', //attribute name
                        'mode'=>'date', //use "time","date" or "datetime" (default)
                        'options'=>array(
                            'dateFormat' => 'dd/mm/yy',
                        ), // jquery plugin options
                    ));
                ?>
		<?php echo $form->error($model,'date'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'time_start'); ?>
		<?php
                    $this->widget('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker',array(
                        'model'=>$model, //Model object
                        'attribute'=>'time_start', //attribute name
                        'mode'=>'time', //use "time","date" or "datetime" (default)
                        'options'=>array(), // jquery plugin options
                    ));
                ?>
		<?php echo $form->error($model,'time_start'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'time_end'); ?>
		<?php
                    $this->widget('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker',array(
                        'model'=>$model, //Model object
                        'attribute'=>'time_end', //attribute name
                        'mode'=>'time', //use "time","date" or "datetime" (default)
                        'options'=>array(), // jquery plugin options
                    ));
                ?>
		<?php echo $form->error($model,'time_end'); ?>
	</div>
        
        <div class="row">
		<?php echo $form->labelEx($model,'room_id'); ?>
		<?php
                    $roomData = CHtml::listData($ruangRapat, 'id', 'name');
                    echo $form->dropDownList($model, 'room_id', $roomData);
                ?>
		<?php echo $form->error($model,'room_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'participant'); ?>
		<?php echo $form->textField($model,'participant'); ?>
		<?php echo $form->error($model,'participant'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'message'); ?>
		<?php echo $form->textArea($model,'message'); ?>
		<?php echo $form->error($model,'message'); ?>
	</div>


	<div class="row buttons">
		<?php echo CHtml::submitButton('Submit'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->